// RunView.cpp : implementation file
//

#include "stdafx.h"
#include "Measure.h"
#include "RunView.h"


// CRunView

IMPLEMENT_DYNAMIC(CRunView, CWnd)

CRunView::CRunView()
{

}

CRunView::~CRunView()
{
}


BEGIN_MESSAGE_MAP(CRunView, CWnd)
  ON_WM_ERASEBKGND()
END_MESSAGE_MAP()



// CRunView message handlers




BOOL CRunView::PreCreateWindow(CREATESTRUCT& cs)
{
  if (!CWnd::PreCreateWindow(cs))
    return FALSE;

  cs.dwExStyle |= WS_EX_CLIENTEDGE;
  cs.style &= ~WS_BORDER;
  cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS, 
    ::LoadCursor(NULL, IDC_ARROW), reinterpret_cast<HBRUSH>(COLOR_WINDOW+1), NULL);

  return TRUE;
}


BOOL CRunView::OnEraseBkgnd(CDC* pDC)
{
  // Save old brush
  CBrush* pOldBrush = pDC->SelectObject(&theApp.canvas_brush());

  CRect rect;
  pDC->GetClipBox(&rect);     // Erase the area needed

  pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(), PATCOPY);
  pDC->SelectObject(pOldBrush);

  return TRUE;
}
